<template>
  <div>
    <router-view></router-view>
    <Foot v-if="isShow"></Foot>
  </div>
</template>

<script setup>
import Foot from './components/Foot.vue';
import { useRouter } from 'vue-router'
import { ref } from 'vue';


const isShow = ref(true)
const router = useRouter()
// 某些页面是不需要 head
const whileList = ['/login', '/userDetail'];


router.beforeEach((to, from, next) => {
  // console.log(to.path);
  if (whileList.includes(to.path)) {
    isShow.value = false
    next()
  } else {
    isShow.value = true
    next()
  }
})
</script>

<style lang="scss" scoped></style>